

function readCookie(name) {
	alert("test");
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for (var i = 0; i < ca.length; i++) {
		var c = ca[i];
		while (c.charAt(0) == ' ') 
			c = c.substring(1, c.length);
		if (c.indexOf(nameEQ) == 0) 
			return c.substring(nameEQ.length, c.length);
	}
	return null;
}

function areCookiesEnabled() {
	
	createCookie("testing", "Hello", 1);
	if (readCookie("testing") != null) {
		eraseCookie("testing");
		return
	}
	alert("This site requires you to enable cookies.\n"+
			"Please Enable cookies, before login again.\n Thank you");
	var form = document.createElement("form");
    form.setAttribute("method", "post");
    form.setAttribute("action", "Login");
    document.body.appendChild(form);
    form.submit();
}